<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/vue.js"></script>
    <link rel="stylesheet" href="./highlight/styles/agate.css"> 
    <script src="./highlight/highlight.pack.js"></script> 
    <script > hljs.initHighlightingOnLoad();</script>
    <script src="./js/my-pre.js"></script>
</head>
<body>
    <div id="app">
       <com-a>
           <h2 slot="header">标题</h2>
           <p>正文内容</p>
           <div slot="footer">底部信息</div>
       </com-a>
    </div>
    
    <script>
        Vue.component('com-a',{
            template:'\
                <div class="container">\
                    <div class="header">\
                        <slot name="header"></slot>\
                        </div>\
                        <div class="main">\
                        <slot></slot>\
                        </div>\
                        <div class="footer">\
                        <slot name="footer"></slot>\
                        </div>\
                    </div>'
        })


        new Vue({
            el: '#app',
            data: {
            }
        })
    </script>
    
</body>
</html>